using System;
using System.Runtime.CompilerServices;

namespace Mono4Delphi
{
	
	public class Dialogs
	{
		
		[MethodImplAttribute(MethodImplOptions.InternalCall)]
	    extern public static void ShowMessage(string value);
	}
	
    public delegate void TNotifyEvent(ITObject sender);
	public delegate void TKeyPressEvent(ITObject sender, ref char Key);
	
	public interface ITObject
	{
		IntPtr GetHInstance();
	}
	
	public interface ITComponent: ITObject
	{		
		string Name {get; set;}
		ITComponent FindComponent(string aName);
		ITComponent Owner{get; }
	}
	
	public interface ITControl: ITComponent
	{
		ITControl FindChildControl(string ControlName);
	}
	
	public interface ITEdit: ITControl
	{
		string Text {get; set;}
		event TKeyPressEvent OnKeyPress;
	}
	
	public interface ITButton: ITControl
	{
		string Caption {get; set;}
		void Click();
		event TNotifyEvent OnClick;
	}
	
	public interface ITForm: ITControl
	{
		void show();
		string Caption {get; set;}
	}	
			
	
	public interface ITStrings: ITObject
	{
		int Count {get;}
		string Text {get; set;}
		int Add(string s);
		int AddObject(string s, ITObject aObject);
		void Clear();
		void Delete(int aIndex);
		int IndexOf(string s);		
		// index prop
		string this[int index] {get; set;} // get_Item, set_Item
		string get_Names(int aIndex);		
		string get_Values(string aName);		
		void set_Values(string aName, string aValue);				
	}
		
	public interface ITMemo: ITControl
	{
		ITStrings Lines {get;}	
	}
	
}

